SELECT VENDEDOR, CODIGO_FILIAL, NOME_VENDEDOR, DATA_DESATIVACAO FROM LOJA_VENDEDORES 
WHERE VENDEDOR in

SELECT CODIGO_CLIENTE, CLIENTE_VAREJO, FILIAL, LIMITE_CREDITO, LIMITE_CREDITO_TOTAL, STATUS FROM CLIENTES_VAREJO 
WHERE CODIGO_CLIENTE in ('9210','9670','A547','A897','C891','C967','D044','D047',
'D048','D098','X590','8404','A758','B274','B571','C057','C293','C329','C347','C826','C914','C915','C988','D030','D178','D218',
'D241','D274','X462','9226','9817','B073','B669','C364','C388','C505','C600','C850','C853','D317','8184','A962','B551','B847',
'C225','C439','C452','C578','C592','C868','D223','D237','D266','X514','2374','B091','B318','C244','C268','C417','C494','C495',
'C496','C954','D037','D240','D289','X102','X419','X431','X512','X651','B948','C273','C331','C854','C991','D182','D207','X657',
'X777','A696','B304','B765','C316','C381','D296','X461','X793','9784','B287','B291','B392','B988','C193','C355','C984','D068',
'D190','X576','X579','6389','A777','A980','C858','D109','D226','X641','X726','2543','B834','B939','C507','C591','C598','C624',
'D156','D179','D210','D259','3780','8987','9012','B319','B661','C351','C997','D246','4778','9878','B675','B678','B776','B778',
'C098','C588','C792','C905','D031','D055','D308','D319','A709','A948','A999','C005','C117','C122','C337','C635','C940','X038',
'5638','7020','B835','C674','C912','D073','X420','X427','X863','7744','B212','B682','B876','C564','C734','D084','D208','D264',
'D307','3895','9853','A072','A673','B763','C217','C793','C877','D321','X776','3256','8262','8676','A545','A659','C196','C346',
'C862','C958','D187','D285','1757','2056','A762','A880','B815','C004','C058','C135','C203','C827','C902','X712','6805','6820',
'A724','A947','B387','B740','C687','C796','C832','D284','D286','X405','X626','X673','X682','X849','2967','5398','9639','B382',
'B827','C011','C133','C267','C384','C425','C562','D183','X496','X881','B473','B622','C397','C947','C949','X895','6752','7231',
'8510','9318','A259','B156','C694','D029','X750','9659','A895','B785','B919','C625','D065','D077','D163','2568','A680','B581',
'C375','C794','C906','C913','C936','D075','D082','A882','B788','C022','C422','C548','C829','D012','D074','X785','5528','8574',
'9766','B278','B373','B416','C336','C994','8867','B355','C324','C328','C423','C518','C787','C979','X195','8415','A617','B372',
'C499','C501','C515','D039','D227','D287','D288','9292','9604','B651','B914','C110','C962','C963','C968','5055','B058','B269',
'B940','C481','C482','C835','X696','8926','B078','B454','B927','C073','C120','C799','8385','9440','B422','C930','D079','D110',
'3412','B470','B471','B564','C205','D092','X489','9112','B692','C618','C706','C867','C937','D253','X499','7623','9767','A928',
'C119','C181','C628','C819','X740','1368','8635','8636','8748','9602','9652','C211','D089','X375','B936','C228','C308','C449',
'C721','D014','X888','1813','3462','4889','8123','9889','A248','B588','B750','B843','C846','C896','C918','C948','C952','D290',
'X809','2522','3802','8840','8968','A770','B176','B567','B613','C053','C545','C775','D042','D070','D270','1589','7040','A678',
'B247','B313','B565','B769','C330','C406','C577','D040','D091','X277','9011','9256','A824','B170','B256','B719','B972','C105',
'C186','C266','X148','6830','9243','A518','B557','B670','D007','D161','X479','X585','5809','A558','B104','B383','B832','C070',
'C097','D160','D162','3637','9367','9667','B659','B824','B899','B953','C192','D026','D027','D141','D311','X565','X661','2710',
'5424','7693','C051','C063','C341','C924','C934','X710','8772','9722','C068','C253','C278','C485','C783','C823','D101','X529',
'9687','B072','B393','B608','B725','C383','C883','X570','6654','8920','A811','B405','B873','C314','C484','C919','D239','D281',
'D291','D305','6886','6888','7232','A599','B308','B589','B816','C274','C426','C971','D262','5406','9838','C054','C206','D051',
'D090','D164','D193','D322','X536','X860','8314','9355','9821','B979','C210','C606','C675','C995','X737','A878','B829','C872',
'D080','D121','D137','X562','8285','C508','C623','C885','C886','D243','D244','8178','9362','B108','B220','B347','C067','C797',
'C841','D043','9017','9922','B724','B833','C366','C993','D004','D011','D261','X631','9134','C043','C249','C483','X387','X687',
'X692','4072','7961','9299','B883','C220','C457','C486','C878','C887','D167','4846','B780','C284','C365','C808','C941','X791',
'X859','3691','8630','9886','B929','C229','C255','X321','X503','8244','8993','B207','C265','C519','C664','C740','D170','X444',
'8238','8752','9601','9778','A626','B360','B556','B786','C699','D017','X805','8712','A572','B380','B650','C301','D005','D217',
'D295','X236','X605','X756','A832','B602','B757','C095','C946','D104','A978','C528','C596','C815','C869','C901','A621','A833',
'C102','C305','C966','6559','8069','9720','B918','B957','X168','X517','X653','8604','B329','C730','C813','D123','D124','X837',
'1341','7618','8620','8678','8893','A350','A949','C938','C977','5341','A480','B546','B931','C718','C863','D294','X841','8949',
'8961','C323','D185','D194','3511','9694','B756','C258','C800','C889','2822','7805','B754','C108','C327','C459','D275','D292',
'X132','4896','7127','9499','B302','B576','C037','C837','C873','9599','A566','B794','C969','D069','X323','8934','B080','C032',
'C109','C312','C700','C727','C892','D035','D045','9380','9606','B199','B662','C289','C972','D320','X620','X621','C035','C168',
'C551','C587','D298','2879','C402','C438','C667','C845','C982','D272','D273','X587','B420','B506','C361','C669','C731','C945',
'D232','X672','1160','8048','A734','B666','C717','D067','D236','D242','X509','A936','A937','B085','B615','B656','B900','C546',
'C978','7189','8334','B707','B709','B711','B928','C713','C890','D041','D303','X779','4834','B532','C840','D254','X830','C034',
'C960','D221','D255','X276','X353','A595','B777','C656','C751','C755','C757','C759','C761','C944','D081','D258','9903','B396',
'B821','D001','D003','D008','D181','D280','D282','X819','5227','8399','B880','C007','C497','C597','C923','D028','2795','9520',
'9960','C065','C260','C354','C785','C843','C875','C927','C928','D214','X678','C261','C602','C825','A950','C235','B734','B858',
'C322','C401','C580','X588','B965','C898','D057','D058','D062','D063','D064','D158','X157','X569','7510','9171','C409','C410',
'C412','C461','C476','C477','C573','C638','C916','C922','C932','C973','D010','D265','X566','7969','C642','C646','C866','C917',
'X745','X896','X897','8547','C576','D088','D202','D203','D204','D205','D206','D222','A850','B838','C701','C911','C925','D076',
'X416','C649','D299','7116','8497','B298','B479','C374','C849','C931','D022','D215','D220','X313','X446','7084','B597','B809',
'B997','C087','C935','D165','D166','D228','D301','D313','X209','X541','1880','2301','C525','C786','C818','D138','4635','B514',
'B755','B966','C318','C326','C590','C719','D134','D304','X557','B331','B958','C185','C810','C921','D224','X838','X852','9159',
'9514','9605','B424','B438','C145','C263','D066','D312','D318','X609','A564','B273','C124','C685','C920','D102','D209','D247',
'4085','B469','B885','C209','C943','C951','C970','D013','D268','D283','D300','D302','C992','D025','X007','X100','7162','8702',
'9655','A813','B442','C077','C468','D046','D052','1633','B477','B867','C139','C702','C817','D100','D310','X076','7267','8978',
'9312','9714','A896','B282','B614','B643','C132','X248','6824','A039','C321','C661','C893','C985','D016','D245','D248','9290',
'B906','B924','B970','C430','D135','D225','D238','D309','1672','8034','8952','9137','C008','C856','D115','D116','D117','D233',
'D277','9415','A660','B049','B087','B107','B770','B851','C688','C882','D009','D034','D049','D107','X581','B455','B466','C834',
'C870','C910','2792','8851','9957','B016','C831','D219','D278','D279','D297','D306','X683','5188','B566','C198','C376','D024',
'X658','8033','B032','B840','C306','C631','X664','X846','5308','B194','B480','B690','B954','C014','C062','C565','D083','D269',
'X762','9400','B739','C208','C689','C711','C888','C964','X727','9328','B890','C061','C523','C860','X686','7350','A524','B563',
'B596','C692','X733','5834','A506','A619','B197','B254','B591','B712','B713','C056','C195','C894','D015','X797','9077','B338',
'B385','B449','B865','B886','C987','D229','D231','D267','9929','C064','C373','C540','C595','C956','D276','X684','A200','A749',
'B540','B559','C313','D260','B545','B663','C157','C245','C983','D125','D126','D127','D128','D129','D130','D131','D132','D157',
'D159','D168','D143','D144','D145','D146','D147','D149','D150','D151','D152','D153','D186','D200')


SELECT VENDEDOR, CODIGO_FILIAL, NOME_VENDEDOR, DATA_DESATIVACAO FROM LOJA_VENDEDORES 
WHERE VENDEDOR in ('9210','9670','A547','A897','C891','C967','D044','D047',
'D048','D098','X590','8404','A758','B274','B571','C057','C293','C329','C347','C826','C914','C915','C988','D030','D178','D218',
'D241','D274','X462','9226','9817','B073','B669','C364','C388','C505','C600','C850','C853','D317','8184','A962','B551','B847',
'C225','C439','C452','C578','C592','C868','D223','D237','D266','X514','2374','B091','B318','C244','C268','C417','C494','C495',
'C496','C954','D037','D240','D289','X102','X419','X431','X512','X651','B948','C273','C331','C854','C991','D182','D207','X657',
'X777','A696','B304','B765','C316','C381','D296','X461','X793','9784','B287','B291','B392','B988','C193','C355','C984','D068',
'D190','X576','X579','6389','A777','A980','C858','D109','D226','X641','X726','2543','B834','B939','C507','C591','C598','C624',
'D156','D179','D210','D259','3780','8987','9012','B319','B661','C351','C997','D246','4778','9878','B675','B678','B776','B778',
'C098','C588','C792','C905','D031','D055','D308','D319','A709','A948','A999','C005','C117','C122','C337','C635','C940','X038',
'5638','7020','B835','C674','C912','D073','X420','X427','X863','7744','B212','B682','B876','C564','C734','D084','D208','D264',
'D307','3895','9853','A072','A673','B763','C217','C793','C877','D321','X776','3256','8262','8676','A545','A659','C196','C346',
'C862','C958','D187','D285','1757','2056','A762','A880','B815','C004','C058','C135','C203','C827','C902','X712','6805','6820',
'A724','A947','B387','B740','C687','C796','C832','D284','D286','X405','X626','X673','X682','X849','2967','5398','9639','B382',
'B827','C011','C133','C267','C384','C425','C562','D183','X496','X881','B473','B622','C397','C947','C949','X895','6752','7231',
'8510','9318','A259','B156','C694','D029','X750','9659','A895','B785','B919','C625','D065','D077','D163','2568','A680','B581',
'C375','C794','C906','C913','C936','D075','D082','A882','B788','C022','C422','C548','C829','D012','D074','X785','5528','8574',
'9766','B278','B373','B416','C336','C994','8867','B355','C324','C328','C423','C518','C787','C979','X195','8415','A617','B372',
'C499','C501','C515','D039','D227','D287','D288','9292','9604','B651','B914','C110','C962','C963','C968','5055','B058','B269',
'B940','C481','C482','C835','X696','8926','B078','B454','B927','C073','C120','C799','8385','9440','B422','C930','D079','D110',
'3412','B470','B471','B564','C205','D092','X489','9112','B692','C618','C706','C867','C937','D253','X499','7623','9767','A928',
'C119','C181','C628','C819','X740','1368','8635','8636','8748','9602','9652','C211','D089','X375','B936','C228','C308','C449',
'C721','D014','X888','1813','3462','4889','8123','9889','A248','B588','B750','B843','C846','C896','C918','C948','C952','D290',
'X809','2522','3802','8840','8968','A770','B176','B567','B613','C053','C545','C775','D042','D070','D270','1589','7040','A678',
'B247','B313','B565','B769','C330','C406','C577','D040','D091','X277','9011','9256','A824','B170','B256','B719','B972','C105',
'C186','C266','X148','6830','9243','A518','B557','B670','D007','D161','X479','X585','5809','A558','B104','B383','B832','C070',
'C097','D160','D162','3637','9367','9667','B659','B824','B899','B953','C192','D026','D027','D141','D311','X565','X661','2710',
'5424','7693','C051','C063','C341','C924','C934','X710','8772','9722','C068','C253','C278','C485','C783','C823','D101','X529',
'9687','B072','B393','B608','B725','C383','C883','X570','6654','8920','A811','B405','B873','C314','C484','C919','D239','D281',
'D291','D305','6886','6888','7232','A599','B308','B589','B816','C274','C426','C971','D262','5406','9838','C054','C206','D051',
'D090','D164','D193','D322','X536','X860','8314','9355','9821','B979','C210','C606','C675','C995','X737','A878','B829','C872',
'D080','D121','D137','X562','8285','C508','C623','C885','C886','D243','D244','8178','9362','B108','B220','B347','C067','C797',
'C841','D043','9017','9922','B724','B833','C366','C993','D004','D011','D261','X631','9134','C043','C249','C483','X387','X687',
'X692','4072','7961','9299','B883','C220','C457','C486','C878','C887','D167','4846','B780','C284','C365','C808','C941','X791',
'X859','3691','8630','9886','B929','C229','C255','X321','X503','8244','8993','B207','C265','C519','C664','C740','D170','X444',
'8238','8752','9601','9778','A626','B360','B556','B786','C699','D017','X805','8712','A572','B380','B650','C301','D005','D217',
'D295','X236','X605','X756','A832','B602','B757','C095','C946','D104','A978','C528','C596','C815','C869','C901','A621','A833',
'C102','C305','C966','6559','8069','9720','B918','B957','X168','X517','X653','8604','B329','C730','C813','D123','D124','X837',
'1341','7618','8620','8678','8893','A350','A949','C938','C977','5341','A480','B546','B931','C718','C863','D294','X841','8949',
'8961','C323','D185','D194','3511','9694','B756','C258','C800','C889','2822','7805','B754','C108','C327','C459','D275','D292',
'X132','4896','7127','9499','B302','B576','C037','C837','C873','9599','A566','B794','C969','D069','X323','8934','B080','C032',
'C109','C312','C700','C727','C892','D035','D045','9380','9606','B199','B662','C289','C972','D320','X620','X621','C035','C168',
'C551','C587','D298','2879','C402','C438','C667','C845','C982','D272','D273','X587','B420','B506','C361','C669','C731','C945',
'D232','X672','1160','8048','A734','B666','C717','D067','D236','D242','X509','A936','A937','B085','B615','B656','B900','C546',
'C978','7189','8334','B707','B709','B711','B928','C713','C890','D041','D303','X779','4834','B532','C840','D254','X830','C034',
'C960','D221','D255','X276','X353','A595','B777','C656','C751','C755','C757','C759','C761','C944','D081','D258','9903','B396',
'B821','D001','D003','D008','D181','D280','D282','X819','5227','8399','B880','C007','C497','C597','C923','D028','2795','9520',
'9960','C065','C260','C354','C785','C843','C875','C927','C928','D214','X678','C261','C602','C825','A950','C235','B734','B858',
'C322','C401','C580','X588','B965','C898','D057','D058','D062','D063','D064','D158','X157','X569','7510','9171','C409','C410',
'C412','C461','C476','C477','C573','C638','C916','C922','C932','C973','D010','D265','X566','7969','C642','C646','C866','C917',
'X745','X896','X897','8547','C576','D088','D202','D203','D204','D205','D206','D222','A850','B838','C701','C911','C925','D076',
'X416','C649','D299','7116','8497','B298','B479','C374','C849','C931','D022','D215','D220','X313','X446','7084','B597','B809',
'B997','C087','C935','D165','D166','D228','D301','D313','X209','X541','1880','2301','C525','C786','C818','D138','4635','B514',
'B755','B966','C318','C326','C590','C719','D134','D304','X557','B331','B958','C185','C810','C921','D224','X838','X852','9159',
'9514','9605','B424','B438','C145','C263','D066','D312','D318','X609','A564','B273','C124','C685','C920','D102','D209','D247',
'4085','B469','B885','C209','C943','C951','C970','D013','D268','D283','D300','D302','C992','D025','X007','X100','7162','8702',
'9655','A813','B442','C077','C468','D046','D052','1633','B477','B867','C139','C702','C817','D100','D310','X076','7267','8978',
'9312','9714','A896','B282','B614','B643','C132','X248','6824','A039','C321','C661','C893','C985','D016','D245','D248','9290',
'B906','B924','B970','C430','D135','D225','D238','D309','1672','8034','8952','9137','C008','C856','D115','D116','D117','D233',
'D277','9415','A660','B049','B087','B107','B770','B851','C688','C882','D009','D034','D049','D107','X581','B455','B466','C834',
'C870','C910','2792','8851','9957','B016','C831','D219','D278','D279','D297','D306','X683','5188','B566','C198','C376','D024',
'X658','8033','B032','B840','C306','C631','X664','X846','5308','B194','B480','B690','B954','C014','C062','C565','D083','D269',
'X762','9400','B739','C208','C689','C711','C888','C964','X727','9328','B890','C061','C523','C860','X686','7350','A524','B563',
'B596','C692','X733','5834','A506','A619','B197','B254','B591','B712','B713','C056','C195','C894','D015','X797','9077','B338',
'B385','B449','B865','B886','C987','D229','D231','D267','9929','C064','C373','C540','C595','C956','D276','X684','A200','A749',
'B540','B559','C313','D260','B545','B663','C157','C245','C983','D125','D126','D127','D128','D129','D130','D131','D132','D157',
'D159','D168','D143','D144','D145','D146','D147','D149','D150','D151','D152','D153','D186','D200')

UPDATE CLIENTES_VAREJO  SET STATUS = '1'
WHERE CODIGO_CLIENTE IN ('D164','D179','D207','X657','3412','8949','8961','9011','9134','9171','9243','9292','6559','4778','3780',
'2967','9687','9694','B032','B957','A595','A950','D073','2374','B876')

UPDATE CLIENTES_VAREJO  SET LIMITE_CREDITO= '250.00' 
WHERE CODIGO_CLIENTE IN ('d073')